#include "kdpch.h"
#include "Framebuffer.h"

#include "KuaDu/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLFramebuffer.h"

namespace KD {

	Ref<Framebuffer> Framebuffer::Create(const FramebufferSpecification& spec)
	{
		switch (Renderer::GetAPI())
		{
			case RendererAPI::API::None: KD_CORE_ASSERT(false, "目前不支持RendererAPI::None！"); return nullptr;
			case RendererAPI::API::OpenGL: return CreateRef<OpenGLFramebuffer>(spec);
		}

		KD_CORE_ASSERT(false, "未知的渲染API");
		return nullptr;
	}

}